package com.situ.personal.controller;

import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.situ.personal.entity.User;
import com.situ.personal.service.IUserService;
import com.situ.personal.service.impl.UserServiceImpl;
import com.sun.swing.internal.plaf.metal.resources.metal;

@Controller
@RequestMapping("/user")
public class UserController {
	private IUserService userService = new UserServiceImpl();

	@RequestMapping("/selectAll")
	public String selectAll(Model model) {
		System.out.println("UserController.selectAll()");
		List<User> list = userService.selectAll();
		model.addAttribute("list", list);
		
		return "/user_list.jsp";
	}
}
